#ifndef TKOM_INTERPRETER_H
#define TKOM_INTERPRETER_H

#include <QtGui/QMainWindow>
#include <QSplitter>
#include <QTextEdit>
#include <QTreeView>
#include <QDockWidget>
#include <QtDebug>
#include <QFile>
#include <QTextEdit>
#include <QTextStream>
#include <QFileDialog>

#include "fractioninterpreter.h"
#include "consolewidget.h"
#include "lexemview.h"

#include "ui_tkom-interpreter.h"

class TkomInterpreter : public QMainWindow
{
	Q_OBJECT

public:
	TkomInterpreter(QWidget *parent = 0, Qt::WFlags flags = 0);
	~TkomInterpreter();

private:
	void createActions();
	void createMenus();
	void createToolbar();
	void createStatusBar();	
	void createDockWidgets();

private slots:
	void openfile();
	void savefile();
	void saveasfile();
	
	void setfont();
	
	void runinterpreter();
	void loadexample1();
	void loadexample2();


private:
	Ui::MyClassClass ui;

	QDockWidget* console;
	QDockWidget* lexemTree;

	ConsoleWidget* output;
	LexemView*	 lexem_view;

	QMenu* fileMenu;
	QAction* open;
	QAction* save;
	QAction* save_as;
	QAction* quit;

	QMenu* viewMenu;
	QAction* font;
	QMenu* oknaMenu;

	QMenu* runMenu;
	QAction* run;
	QAction* example1;
	QAction* example2;

	QString filename;

	QTextEdit* code;
	FractionInterpreter* interpreter;
};

void myMessageOutput(QtMsgType type, const char *msg);



#endif // TKOM_INTERPRETER_H
